package org.aaron.mp3player;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class MainActivity extends TabActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.maintablayout);
		initActivity();
	}

	private void initActivity() {
		TabHost tabHost = getTabHost();
		Intent remotoIntent = new Intent();
		remotoIntent.setClass(MainActivity.this, Mp3ListActivity.class);
		TabHost.TabSpec tabSpec = tabHost.newTabSpec("remote");
		tabSpec.setIndicator("remote", getResources().getDrawable(android.R.drawable.stat_sys_download));
		tabSpec.setContent(remotoIntent);
		tabHost.addTab(tabSpec);
		
		Intent localIntent = new Intent();
		localIntent.setClass(MainActivity.this, LocalMp3ListActivity.class);
		TabHost.TabSpec tabSpec2 = tabHost.newTabSpec("local");
		tabSpec2.setIndicator("local", getResources().getDrawable(android.R.drawable.stat_sys_upload));
		tabSpec2.setContent(localIntent);
		tabHost.addTab(tabSpec2);
	}

}
